#include "TableInterface/table.h"
#include "function_interface.h"
#include "fpga_interface.h"
#include "comm_monitor.h"
#include "electricity_quantity_statistics.h"
#include "global_variable.h"
#include "Product.h"
#include <time.h>
#include "debug.h"


int EmsTable_InitCallback(tableEntry_t *pEntry)
{
    int retVal = 0;
    uint32_t addr = pEntry->idx;
    uint16_t *pValue = &pEntry->data;
    float fValue = 0;

    funcInfCtrlMode_t ctrlmode;
    funcInfRunMode_t runmode;
    fpagDataFsm_t fsm;

    switch(addr)
    {
        case 10000:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetCtrlMode(NULL, &ctrlmode);
            if (ctrlmode == FUNCINF_CTRL_MODE_REMOTE)
            {
                *pValue = 0x1111;
            }
            else if (ctrlmode == FUNCINF_CTRL_MODE_LOCAL)
            {
                *pValue = 0x4444;
            }
            else
            {
                *pValue = 0;
            }
            #endif
            break;
        }
        
        case 10001:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetRunMode(NULL, &runmode);
            if(runmode ==  FUNCINF_RUN_MODE_PQ)
            {
                *pValue = 0x1111;
            }
            else if(runmode == FUNCINF_RUN_MODE_VF)
            {
                *pValue = 0x2222;
            }
            else if(runmode == FUNCINF_RUN_MODE_VSG)
            {
                *pValue = 0x3333;
            }
            else
            {
                *pValue = 0;
            }
            #endif
            break;
        }

        case 10002:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetFsm(FUNCINF_FSM_TYPE_THIS_TIME, &fsm);
            if (fsm == FUNCINF_FSM_IDLE)
            {
                *pValue = 0x55AA;
            }
            else if (fsm == FUNCINF_FSM_WORKING)
            {
                *pValue = 0xAA55;
            }else
            {
                *pValue = 0;
            }
            #endif
            break;
        }

        case 10003:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetPower(FUNCINF_PWR_TYPE_ACT, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 10004:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetPower(FUNCINF_PWR_TYPE_REACT, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 10100:
        {
            *pValue = 10100;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_Q_MODE_SEL, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }
        
        case 10101:
        {
            *pValue = 10101;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_MODE_EN, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }
        
        case 10102:
        {
            *pValue = 10102;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_MODE_EN, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }
        
        case 10103:
        {
            *pValue = 10103;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PL_MODE_EN, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }
        
        case 10104:
        {
            *pValue = 10104;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P3, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10105:
        {
            *pValue = 10105;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q3, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10106:
        {
            *pValue = 10106;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10107:
        {
            *pValue = 10107;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10108:
        {
            *pValue = 10108;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10109:
        {
            *pValue = 10109;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10110:
        {
            *pValue = 10110;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P1_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10111:
        {
            *pValue = 10111;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q1_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10112:
        {
            *pValue = 10112;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P2_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10113:
        {
            *pValue = 10113;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q2_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10114:
        {
            *pValue = 10114;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P3_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10115:
        {
            *pValue = 10115;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q3_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10116:
        {
            *pValue = 10116;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_UREF, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }
        
        case 10117:
        {
            *pValue = 10117;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_V2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10118:
        {
            *pValue = 10118;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_Q2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10119:
        {
            *pValue = 10119;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_V1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10120:
        {
            *pValue = 10120;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_Q1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10121:
        {
            *pValue = 10121;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_V3, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10122:
        {
            *pValue = 10122;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_Q3, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10123:
        {
            *pValue = 10123;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_V4, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10124:
        {
            *pValue = 10124;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_Q4, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10125:
        {
            *pValue = 10125;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_TRESP, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10126:
        {
            *pValue = 10126;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_CPF_PF, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }
        
        case 10127:
        {
            *pValue = 10127;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_V1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10128:
        {
            *pValue = 10128;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_P1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10129:
        {
            *pValue = 10129;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_V2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10130:
        {
            *pValue = 10130;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_P2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10131:
        {
            *pValue = 10131;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_TRESP, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10132:
        {
            *pValue = 10132;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_DBUF, &fValue);
            *pValue = (int16_t)(fValue * 1000);
            #endif
            break;
        }
        
        case 10133:
        {
            *pValue = 10133;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_PVAL, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10134:
        {
            *pValue = 10134;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_KUF, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }
        
        case 10135:
        {
            *pValue = 10135;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_DBOF, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }
        
        case 10136:
        {
            *pValue = 10136;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_PMIN, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10137:
        {
            *pValue = 10137;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_KOF, &fValue);
            *pValue = (int16_t)(fValue * 1000);
            #endif
            break;
        }
        
        case 10138:
        {
            *pValue = 10138;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_TRESP, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10139:
        {
            *pValue = 10139;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PL_PMAX, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 10140:
        {
            *pValue = 10140;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OV_2L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }  

        case 10141:
        {
            *pValue = 10141;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OV_1L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10142:
        {
            *pValue = 10142;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UV_1L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10143:
        {
            *pValue = 10143;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UV_2L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10144:
        {
            *pValue = 10144;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OV_2L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10145:
        {
            *pValue = 10145;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OV_1L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10146:
        {
            *pValue = 10146;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UV_1L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10147:
        {
            *pValue = 10147;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UV_2L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10148:
        {
            *pValue = 10148;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OF_2L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }  

        case 10149:
        {
            *pValue = 10149;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OF_1L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10150:
        {
            *pValue = 10150;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UF_1L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10151:
        {
            *pValue = 10151;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UF_2L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10152:
        {
            *pValue = 10152;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OF_2L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 200);
            #endif
            break;
        }

        case 10153:
        {
            *pValue = 10153;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OF_1L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 200);
            #endif
            break;
        }

        case 10154:
        {
            *pValue = 10154;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UF_1L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 200);
            #endif
            break;
        }

        case 10155:
        {
            *pValue = 10155;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UF_2L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 200);
            #endif
            break;
        }
    }

    return retVal;
}


int EmsTable_RefreshCallback(tableEntry_t *pEntry)
{
    int retVal = 0;
    uint32_t addr = pEntry->idx;
    uint16_t *pValue = &pEntry->data;
    int32_t tempI32 = 0;
    float fValue = 0;
    float fValue1 = 0;
    float fValue2 = 0;
    funcInfCtrlMode_t ctrlmode;
    funcInfRunMode_t runmode;
    fpagDataFsm_t fsm;
    funcInfDevState_t DevState;
    u16BitType_t stateU16;
    commState_t state;

    switch(addr)
    {
        case 20000:
        {
            *pValue = 20000;
            #if 1
            /* 交流电压A相有效值 */
            FuncInf_GetVoltage(FUNCINF_VOL_TYPE_PHASE_A, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20001:
        {
            *pValue = 20001;
            #if 1
            /* 交流电压B相有效值 */
            FuncInf_GetVoltage(FUNCINF_VOL_TYPE_PHASE_B, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20002:
        {
            *pValue = 20002;
            #if 1
            /* 交流电压C相有效值 */
            FuncInf_GetVoltage(FUNCINF_VOL_TYPE_PHASE_C, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20003:
        {
            *pValue = 20003;
            #if 1
            /* 交流电流A相有效值 */
            FuncInf_GetCurrent(FUNCINF_CUR_TYPE_PHASE_A, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20004:
        {
            *pValue = 20004;
            #if 1
            /* 交流电流B相有效值 */
            FuncInf_GetCurrent(FUNCINF_CUR_TYPE_PHASE_B, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20005:
        {
            *pValue = 20005;
            #if 1
            /* 交流电流C相有效值 */
            FuncInf_GetCurrent(FUNCINF_CUR_TYPE_PHASE_C, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20006:
        {
            *pValue = 20006;
            #if 1
            /* 电网频率 */
            FuncInf_GetFrequency(NULL, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20007:
        {
            *pValue = 20007;
            #if 1
            /* 有功功率 */
            FuncInf_GetPower(FUNCINF_PWR_TYPE_ACT, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20008:
        {
            *pValue = 20008;
            #if 1
            /* 无功功率 */
            FuncInf_GetPower(FUNCINF_PWR_TYPE_REACT, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20009:
        {
            *pValue = 20009;
            #if 1
            /* 功率因数 */
            FuncInf_GetPowerFactor(NULL, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 20010:
        {
            *pValue = 20010;
            #if 1
            /* 母线直流电压值 */
            FuncInf_GetVoltage(FUNCINF_VOL_TYPE_BUS, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20011:
        {
            *pValue = 20011;
            #if 1
            /* 母线直流电流值 */
            FuncInf_GetCurrent(FUNCINF_CUR_TYPE_BUS, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20012:
        {
            *pValue = 20012;
            #if 1
            /* 母线直流侧功率 */
            FuncInf_GetPower(FUNCINF_PWR_TYPE_BUS, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20013:
        {
            *pValue = 20013;
            #if 1
            /* IGBT温度_A相 */
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_A0, &fValue1);
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_A1, &fValue2);
            fValue = fValue2 > fValue1 ? fValue2 : fValue1;
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20014:
        {
            *pValue = 20014;
            #if 1
            /* IGBT温度_B相 */
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_B0, &fValue1);
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_B1, &fValue2);
            fValue = fValue2 > fValue1 ? fValue2 : fValue1;
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20015:
        {
            *pValue = 20015;
            #if 1
            /* IGBT温度_C相 */
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_C0, &fValue1);
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_C1, &fValue2);
            fValue = fValue2 > fValue1 ? fValue2 : fValue1;
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20016:
        {
            *pValue = 20016;
            #if 1
            /* 设备额定功率 */
            FuncInf_GetRatedPwr(NULL, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20017:
        {
            *pValue = 20017;
            #if 1
            /* 心跳 */
            FuncInf_GetHeartbeat(NULL, pValue);
            #endif
            break;
        }

        case 20018:
        {
            *pValue = 20018;
            #if 1
            /* 电池电压 */
            FuncInf_GetVoltage(FUNCINF_VOL_TYPE_BAT, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20019:
        {
            *pValue = 20019;
            #if 1
            /* 电池电流 */
            FuncInf_GetCurrent(FUNCINF_CUR_TYPE_BAT, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20020:
        {
            *pValue = 20020;
            #if 1
            /* 电池功率 */
            FuncInf_GetPower(FUNCINF_PWR_TYPE_BAT, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20022:
        {
            *pValue = 20022;
            #if 1
            /* 可充功率限制 */
            FuncInf_GetLimit(FUNCINF_LMT_TYPE_AC_PWR_CHRG, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20023:
        {
            *pValue = 20023;
            #if 1
            /* 可放功率限制 */
            FuncInf_GetLimit(FUNCINF_LMT_TYPE_AC_PWR_DISC, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 20024:
        {
            *pValue = 20024;
            #if 1
            /* 控制模式 */
            FuncInf_GetCtrlMode(NULL, &ctrlmode);
            if (ctrlmode == FUNCINF_CTRL_MODE_REMOTE)
            {
                *pValue = 0x1111;
            }
            else if (ctrlmode == FUNCINF_CTRL_MODE_LOCAL)
            {
                *pValue = 0x4444;
            }
            else
            {
                *pValue = 0;
            }
            #endif
            break;
        }

        case 20025:
        {
            *pValue = 20025;
            #if 1
            /* 运行模式 */
            FuncInf_GetRunMode(NULL, &runmode);
            if(runmode ==  FUNCINF_RUN_MODE_PQ)
            {
                *pValue = 0x1111;
            }
            else if(runmode == FUNCINF_RUN_MODE_VF)
            {
                *pValue = 0x2222;
            }
            else if(runmode == FUNCINF_RUN_MODE_VSG)
            {
                *pValue = 0x3333;
            }
            else
            {
                *pValue = 0;
            }
            #endif
            break;
        }

        case 20026:
        {
            *pValue = 20026;
            #if 1
            FuncInf_GetDevState(NULL, &DevState);
            if(DevState == FUNCINF_DEV_STATE_SHUTDOWN)
            {
                *pValue = 0;
            }else if(DevState == FUNCINF_DEV_STATE_STANDBY)
            {
                *pValue = 1;
            }else if(DevState == FUNCINF_DEV_STATE_CHRGING)
            {
                *pValue = 2;
            }else if(DevState == FUNCINF_DEV_STATE_DISCING)
            {
                *pValue = 3;
            }else if(DevState == FUNCINF_DEV_STATE_FAULT)
            {
                *pValue = 4;
            }
            #endif
            break;
        }

        case 20027:
        {
            *pValue = 20027;
            #if 1
            /* 系统故障锁存寄存器0 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_0, pValue);
            #endif
            break;
        }

        case 20028:
        {
            *pValue = 20028;
            #if 1
            /* 系统故障锁存寄存器1 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_1, pValue);
            #endif
            break;
        }

        case 20029:
        {
            *pValue = 20029;
            #if 1
            /* 系统故障锁存寄存器2 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_2, pValue);
            #endif
            break;
        }

        case 20030:
        {
            *pValue = 20030;
            #if 1
            /* 系统故障锁存寄存器3 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_3, pValue);
            #endif
            break;
        }

        case 20031:
        {
            *pValue = 20031;
            #if 1
            /* 系统故障锁存寄存器4 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_4, pValue);
            #endif
            break;
        }

        case 20032:
        {
            *pValue = 20032;
            #if 1
            /* 系统故障锁存寄存器5 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_5, pValue);
            #endif
            break;
        }

        case 20033:
        {
            *pValue = 20033;
            #if 1
            /* 系统故障锁存寄存器6 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_6, pValue);
            #endif
            break;
        }

        case 20034:
        {
            *pValue = 20034;
            #if 1
            /* 系统故障锁存寄存器7 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_7, pValue);
            #endif
            break;
        }

        case 20035:
        {
            *pValue = 20035;
            #if 1
            /* 系统故障锁存寄存器8 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_8, pValue);
            #endif
            break;
        }

        case 20036:
        {
            *pValue = 20036;
            #if 1
            /* 系统故障锁存寄存器9 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_9, pValue);
            #endif
            break;
        }

        case 20037:
        {
            *pValue = 20037;
            #if 1
            /* 系统故障锁存寄存器10 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_10, pValue);
            #endif
            break;
        }

        case 20038:
        {
            *pValue = 20038;
            #if 1
            /* 系统故障锁存寄存器11 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_11, pValue);
            #endif
            break;
        }

        case 20039:
        {
            *pValue = 20039;
            #if 1
            /* 系统故障锁存寄存器12 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_12, pValue);
            #endif
            break;
        }

        case 20040:
        {
            *pValue = 20040;
            #if 1
            /* 系统故障锁存寄存器13 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_13, pValue);
            #endif
            break;
        }

        case 20041:
        {
            *pValue = 20041;
            #if 1
            /* 系统故障锁存寄存器14 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_14, pValue);
            #endif
            break;
        }

        case 20042:
        {
            *pValue = 20042;
            #if 1
            /* 系统故障锁存寄存器15 */
            FuncInf_GetFaultRegister(FUNCINF_REG_IDX_15, pValue);
            #endif
            break;
        }

        case 20043:
        {
            *pValue = 20043;
            #if 1
            /* IO输入状态寄存器 */
            FuncInf_GetInputRegister(NULL, pValue);
            #endif
            break;
        }

        case 20044:
        {
            *pValue = 20044;
            #if 1
            /* IO输出状态寄存器 */
            FuncInf_GetOutputRegister(NULL, pValue);
            #endif
            break;
        }

        case 20053:
        {
            *pValue = 20053;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_AL23, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20054:
        {
            *pValue = 20054;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_AL14, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20055:
        {
            *pValue = 20055;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_AR23, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20056:
        {
            *pValue = 20056;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_AR14, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20057:
        {
            *pValue = 20057;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_BL23, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20058:
        {
            *pValue = 20058;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_BL14, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20059:
        {
            *pValue = 20059;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_BR23, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20060:
        {
            *pValue = 20060;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_BR14, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20061:
        {
            *pValue = 20061;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_CL23, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20062:
        {
            *pValue = 20062;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_CL14, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20063:
        {
            *pValue = 20063;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_CR23, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20064:
        {
            *pValue = 20064;
            #if 1
            FuncInf_GetIgbtTemperature(FUNCINF_IGBT_TEMP_TYPE_CR14, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }

        case 20065:
        {
            *pValue = 20065;
            #if 1
            *pValue = 0;
            // FanControl_FanErrDataGet(FC_FAN_1, &*pValue);
            #endif
            break;
        }

        case 20066:
        {
            *pValue = 20066;
            #if 1
            *pValue = 0;
            // FanControl_FanErrDataGet(FC_FAN_2, &*pValue);
            #endif
            break;
        }

        case 20067:
        {
            *pValue = 20067;
            #if 1
            stateU16.u16Data = 0;
            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_EMS, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b0 = 0;
            }
            else
            {
                stateU16.bitData.b0 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_LC, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b1 = 0;
            }
            else
            {
                stateU16.bitData.b1 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_BMS, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b2 = 0;
            }
            else
            {
                stateU16.bitData.b2 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_DCDC, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b3 = 0;
            }
            else
            {
                stateU16.bitData.b3 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_BIT4, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b4 = 0;
            }
            else
            {
                stateU16.bitData.b4 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_BIT5, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b5 = 0;
            }
            else
            {
                stateU16.bitData.b5 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_BIT6, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b6 = 0;
            }
            else
            {
                stateU16.bitData.b6 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_BIT7, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b7 = 0;
            }
            else
            {
                stateU16.bitData.b7 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_HMI, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b8 = 0;
            }
            else
            {
                stateU16.bitData.b8 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_ISO_BOARD, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b9 = 0;
            }
            else
            {
                stateU16.bitData.b9 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_FAN1, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b10 = 0;
            }
            else
            {
                stateU16.bitData.b10 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_FAN2, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b11 = 0;
            }
            else
            {
                stateU16.bitData.b11 = 1;
            }
            
            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_METER, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b12 = 0;
            }
            else
            {
                stateU16.bitData.b12 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_BIT13, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b13 = 0;
            }
            else
            {
                stateU16.bitData.b13 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_BIT14, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b14 = 0;
            }
            else
            {
                stateU16.bitData.b14 = 1;
            }

            state = COMM_STATE_INIT;
            CommMonitor_GetCommState(COMM_DEVICE_BIT15, &state);
            if(state != COMM_STATE_ONLINE)
            {
                stateU16.bitData.b15 = 0;
            }
            else
            {
                stateU16.bitData.b15 = 1;
            }
            *pValue = stateU16.u16Data;
            #endif
            break;
        }

        case 20068:
        {
            *pValue = 20068;
            #if 1
            RatedLimit_GetPercentage(pValue);
            #endif
            break;
        }

        case 20069:
        {
            *pValue = 20069;
            #if 1
            RatedLimit_GetReason(0, pValue);
            #endif
            break;
        }

        case 20070:
        {
            *pValue = 20070;
            #if 1
            RatedLimit_GetReason(1, pValue);
            #endif
            break;
        }

        case 20071:
        {
            *pValue = 20071;
            #if 1
            GlobalVariable_GetInt32(GV_INT32_LC_IN_STATE, &tempI32);
            *pValue = (int16_t)tempI32;
            #endif
            break;
        }

        case 20072:
        {
            *pValue = 20072;
            #if 1
            GlobalVariable_GetInt32(GV_INT32_LC_OIL_TEMP, &tempI32);
            *pValue = (int16_t)tempI32;
            #endif
            break;
        }

        case 10000:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetCtrlMode(NULL, &ctrlmode);
            if (ctrlmode == FUNCINF_CTRL_MODE_REMOTE)
            {
                *pValue = 0x1111;
            }
            else if (ctrlmode == FUNCINF_CTRL_MODE_LOCAL)
            {
                *pValue = 0x4444;
            }
            else
            {
                *pValue = 0;
            }
            #endif
            break;
        }
        
        case 10001:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetRunMode(NULL, &runmode);
            if(runmode ==  FUNCINF_RUN_MODE_PQ)
            {
                *pValue = 0x1111;
            }
            else if(runmode == FUNCINF_RUN_MODE_VF)
            {
                *pValue = 0x2222;
            }
            else if(runmode == FUNCINF_RUN_MODE_VSG)
            {
                *pValue = 0x3333;
            }
            else
            {
                *pValue = 0;
            }
            #endif
            break;
        }

        case 10002:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetFsm(FUNCINF_FSM_TYPE_THIS_TIME, &fsm);
            if (fsm == FUNCINF_FSM_IDLE)
            {
                *pValue = 0x55AA;
            }
            else if (fsm == FUNCINF_FSM_WORKING)
            {
                *pValue = 0xAA55;
            }
            #endif
            break;
        }

        case 10003:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_ACT_PWR, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 10004:
        {
            *pValue = 10100;
            #if 1
            FuncInf_GetAppointValue(FUNCINF_APPOINT_TYPE_REACT_PWR, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 10100:
        {
            *pValue = 10100;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_Q_MODE_SEL, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }
        
        case 10101:
        {
            *pValue = 10101;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_MODE_EN, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }
        
        case 10102:
        {
            *pValue = 10102;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_MODE_EN, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }
        
        case 10103:
        {
            *pValue = 10103;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PL_MODE_EN, &fValue);
            *pValue = (int16_t)fValue;
            #endif
            break;
        }
        
        case 10104:
        {
            *pValue = 10104;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P3, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10105:
        {
            *pValue = 10105;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q3, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10106:
        {
            *pValue = 10106;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10107:
        {
            *pValue = 10107;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10108:
        {
            *pValue = 10108;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10109:
        {
            *pValue = 10109;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10110:
        {
            *pValue = 10110;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P1_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10111:
        {
            *pValue = 10111;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q1_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10112:
        {
            *pValue = 10112;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P2_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10113:
        {
            *pValue = 10113;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q2_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10114:
        {
            *pValue = 10114;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_P3_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10115:
        {
            *pValue = 10115;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PQ_Q3_N, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10116:
        {
            *pValue = 10116;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_UREF, &fValue);
            *pValue = (int16_t)fValue * 100;
            #endif
            break;
        }
        
        case 10117:
        {
            *pValue = 10117;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_V2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10118:
        {
            *pValue = 10118;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_Q2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10119:
        {
            *pValue = 10119;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_V1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10120:
        {
            *pValue = 10120;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_Q1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10121:
        {
            *pValue = 10121;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_V3, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10122:
        {
            *pValue = 10122;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_Q3, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10123:
        {
            *pValue = 10123;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_V4, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10124:
        {
            *pValue = 10124;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_Q4, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10125:
        {
            *pValue = 10125;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VQ_TRESP, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10126:
        {
            *pValue = 10126;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_CPF_PF, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }
        
        case 10127:
        {
            *pValue = 10127;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_V1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10128:
        {
            *pValue = 10128;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_P1, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10129:
        {
            *pValue = 10129;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_V2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10130:
        {
            *pValue = 10130;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_P2, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10131:
        {
            *pValue = 10131;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_VP_TRESP, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10132:
        {
            *pValue = 10132;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_DBUF, &fValue);
            *pValue = (int16_t)(fValue * 1000);
            #endif
            break;
        }
        
        case 10133:
        {
            *pValue = 10133;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_PVAL, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10134:
        {
            *pValue = 10134;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_KUF, &fValue);
            *pValue = (int16_t)(fValue * 1000);
            #endif
            break;
        }
        
        case 10135:
        {
            *pValue = 10135;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_DBOF, &fValue);
            *pValue = (int16_t)(fValue * 1000);
            #endif
            break;
        }
        
        case 10136:
        {
            *pValue = 10136;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_PMIN, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10137:
        {
            *pValue = 10137;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_KOF, &fValue);
            *pValue = (int16_t)(fValue * 1000);
            #endif
            break;
        }
        
        case 10138:
        {
            *pValue = 10138;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_FP_TRESP, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }
        
        case 10139:
        {
            *pValue = 10139;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_PL_PMAX, &fValue);
            *pValue = (int16_t)(fValue * 10);
            #endif
            break;
        }

        case 10140:
        {
            *pValue = 10140;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OV_2L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }  

        case 10141:
        {
            *pValue = 10141;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OV_1L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10142:
        {
            *pValue = 10142;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UV_1L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10143:
        {
            *pValue = 10143;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UV_2L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10144:
        {
            *pValue = 10144;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OV_2L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10145:
        {
            *pValue = 10145;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OV_1L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10146:
        {
            *pValue = 10146;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UV_1L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10147:
        {
            *pValue = 10147;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UV_2L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10148:
        {
            *pValue = 10148;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OF_2L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }  

        case 10149:
        {
            *pValue = 10149;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OF_1L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10150:
        {
            *pValue = 10150;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UF_1L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10151:
        {
            *pValue = 10151;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UF_2L, &fValue);
            *pValue = (int16_t)(fValue * 100);
            #endif
            break;
        }

        case 10152:
        {
            *pValue = 10152;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OF_2L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 200);
            #endif
            break;
        }

        case 10153:
        {
            *pValue = 10153;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_OF_1L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 200);
            #endif
            break;
        }

        case 10154:
        {
            *pValue = 10154;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UF_1L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 200);
            #endif
            break;
        }

        case 10155:
        {
            *pValue = 10155;
            #if 1
            FuncInf_Get1547Param(FUNCINF_1547_PARAM_TYPE_UF_2L_TIME, &fValue);
            *pValue = (int16_t)(fValue * 200);
            #endif
            break;
        }

        default:
        {
            *pValue = 10000;
            #if 1
            *pValue = 0;
            #endif
            break;
        }
    }
    return retVal;
}


int EmsTable_SetCallback(tableEntry_t *pEntry)
{
    int retVal = 0;
    int32_t tempI32 = 0;
    uint32_t addr = pEntry->idx;
    uint16_t *pValue = &pEntry->data;
    int16_t dataS16 = 0;
    
    funcInfCtrlMode_t ctrlmode;
    funcInfRunMode_t runmode;

    #if 1
    if(addr == 10000)
    {
        if(*pValue == 0x1111)
        {
            FuncInf_SetCtrlMode(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_CTRL_MODE_REMOTE);
        }
        else if(*pValue == 0x4444) 
        {
            FuncInf_SetCtrlMode(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_CTRL_MODE_LOCAL);
        }
        retVal = 1;
    }

    else
    {
        FuncInf_GetCtrlMode(NULL, &ctrlmode);
        if(ctrlmode != FUNCINF_CTRL_MODE_REMOTE)
        {
            printf("[%s][%d]: 当前不是远程模式，不响应EMS指令\n", __func__, __LINE__);
            retVal = 0;
            return retVal;
        }

        FuncInf_GetCtrlMode(NULL, &ctrlmode);
        if(ctrlmode == FUNCINF_CTRL_MODE_LOCAL)
        {
            retVal = 0;
        }else if(ctrlmode == FUNCINF_CTRL_MODE_REMOTE)
        {
            retVal = 1;
        }
        
        switch(addr)
        {
            case 10000:/* 控制模式 */
            {
                #if 1
                FuncInf_GetCtrlMode(NULL, &ctrlmode);
                if(*pValue == 0x1111 && ctrlmode != FUNCINF_CTRL_MODE_REMOTE) 
                {
                    FuncInf_SetCtrlMode(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_CTRL_MODE_REMOTE);
                }
                else if(*pValue == 0x4444 && ctrlmode != FUNCINF_CTRL_MODE_LOCAL) 
                {
                    FuncInf_SetCtrlMode(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_CTRL_MODE_LOCAL);
                }
                #endif
                break;
            }

            case 10001:/* 运行模式 */
            {
                #if 1
                FuncInf_GetRunMode(NULL, &runmode);
                if(*pValue == 0x1111 && runmode != FUNCINF_RUN_MODE_PQ) 
                {
                    FuncInf_SetRunMode(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_RUN_MODE_PQ);
                }
                else if(*pValue == 0x2222 && runmode != FUNCINF_RUN_MODE_VF) 
                {
                    FuncInf_SetRunMode(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_RUN_MODE_VF);
                }
                else if(*pValue == 0x3333 && runmode != FUNCINF_RUN_MODE_VSG) 
                {
                    FuncInf_SetRunMode(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_RUN_MODE_VSG);
                }
                #endif
                break;
            }

            case 10002:/* 开关机 */
            {
                #if 1
                if(*pValue == 0x55AA)
                {
                    FuncInf_TurnOnOff(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_TURN_OFF);
                }
                else if(*pValue == 0xAA55)
                {
                    GlobalVariable_GetInt32(GV_INT32_LC_IN_FAULT, &tempI32);
                    if(tempI32 != 0)
                    {
                        printf("禁止开机：存在升压变故障!\n");
                        break;
                    }
                    else
                    {
                        FuncInf_TurnOnOff(FUNCINF_OPERATOR_EMS, NULL, FUNCINF_TURN_ON);
                    }
                }
                #endif
                break;
            }

            case 10003:/* 有功功率 */
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                dataS16 = (int16_t)*pValue;
                FuncInf_SetAppointValue(FUNCINF_OPERATOR_EMS, FUNCINF_APPOINT_TYPE_ACT_PWR, (float)dataS16 / 10);
                break;
            }

            case 10004:/* 无功功率 */
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                dataS16 = (int16_t)*pValue;
                FuncInf_SetAppointValue(FUNCINF_OPERATOR_EMS, FUNCINF_APPOINT_TYPE_REACT_PWR, (float)dataS16 / 10);
                break;
            }


            case 10100: //策略选择
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_Q_MODE_SEL, (float)*pValue);
                #endif
                break;
            }   

            case 10101: //电压有功模式使能
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                if(*pValue != 0)
                {
                    FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VP_MODE_EN, 1);
                }
                else
                {
                    FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VP_MODE_EN, 0);
                }
                #endif
                break;
            }  

            case 10102: //一次调频模式使能
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                if(*pValue != 0)
                {
                    FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_MODE_EN, 1);
                }
                else
                {
                    FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_MODE_EN, 0);
                }
                #endif
                break;
            }  

            case 10103: //设备有功功率限制使能
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                if(*pValue != 0)
                {
                    FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PL_MODE_EN, 1);
                }
                else
                {
                    FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PL_MODE_EN, 0);
                }
                #endif
                break;
            } 
    
                
            case 10104: //有功无功模式:有功控制点3
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_P3, (float)dataS16 / 10);
                #endif
                break;
            }    

            case 10105: //有功无功模式:无功控制点3
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_Q3, (float)dataS16 / 10);
                #endif
                break;
            }   

            case 10106: //有功无功模式:有功控制点2
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_P2, (float)dataS16 / 10);
                #endif
                break;
            }    

            case 10107: //有功无功模式:无功控制点2
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_Q2, (float)dataS16 / 10);
                #endif
                break;
            }   

            case 10108: //有功无功模式:有功控制点1
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_P1, (float)dataS16 / 10);
                #endif
                break;
            }    

            case 10109: //有功无功模式:无功控制点1
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_Q1, (float)dataS16 / 10);
                #endif
                break;
            }   

            case 10110: //有功无功模式:有功控制点1'
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_P1_N, (float)dataS16 / 10);
                #endif
                break;
            }    

            case 10111: //有功无功模式:无功控制点1'
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_Q1_N, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10112: //有功无功模式:有功控制点2'
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_P2_N, (float)dataS16 / 10);
                #endif
                break;
            }    

            case 10113: //有功无功模式:无功控制点2'
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_Q2_N, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10114: //有功无功模式:有功控制点3'
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_P3_N, (float)dataS16 / 10);
                #endif
                break;
            }    

            case 10115: //有功无功模式:无功控制点3'
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PQ_Q3_N, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10116: //电压无功模式:电压参考
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_UREF, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10117: //电压无功模式:电压控制点2
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_V2, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10118: //电压无功模式:无功控制点2
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_Q2, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10119: //电压无功模式:电压控制点1
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_V1, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10120: //电压无功模式:无功控制点1
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_Q1, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10121: //电压无功模式:电压控制点3
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_V3, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10122: //电压无功模式:无功控制点3
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_Q3, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10123: //电压无功模式:电压控制点4
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_V4, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10124: //电压无功模式:无功控制点4
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_Q4, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10125: //电压无功模式:响应时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VQ_TRESP, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10126: //恒功率因素模式:功因设定值
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_CPF_PF, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10127: //电压有功模式:电压控制点1
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VP_V1, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10128: //电压有功模式:功率控制点1
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VP_P1, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10129: //电压有功模式:电压控制点2
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VP_V2, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10130: //电压有功模式:功率控制点2
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VP_P2, (float)dataS16 / 10);
                #endif
                break;
            }
                
            case 10131: //电压有功模式:响应时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_VP_TRESP, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10132: //一次调频模式:欠频死区
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_DBUF, (float)dataS16 / 1000);
                #endif
                break;
            }

            case 10133: //一次调频模式:可提供功率
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_PVAL, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10134: //一次调频模式:欠频调频系数
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_KUF, (float)dataS16 / 1000);
                #endif
                break;
            }

            case 10135: //一次调频模式:过频死区
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_DBOF, (float)dataS16 / 1000);
                #endif
                break;
            }

            case 10136: //一次调频模式:最小可吸收功率
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_PMIN, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10137: //一次调频模式:过频调频系数
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_KOF, (float)dataS16 / 1000);
                #endif
                break;
            }

            case 10138: //一次调频模式:响应时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_FP_TRESP, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10139: //限功率模式:最大功率限制
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_PL_PMAX, (float)dataS16 / 10);
                #endif
                break;
            }

            case 10140: //二级过压
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_OV_2L, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10141: //一级过压
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_OV_1L, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10142: //一级欠压
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_UV_1L, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10143: //二级欠压
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_UV_2L, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10144: //二级过压故障清除时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_OV_2L_TIME, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10145: //一级过压故障清除时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_OV_1L_TIME, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10146: //一级欠压故障清除时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_UV_1L_TIME, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10147: //二级欠压故障清除时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_UV_2L_TIME, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10148: //二级过频
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_OF_2L, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10149: //一级过频
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_OF_1L, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10150: //一级欠频
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_UF_1L, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10151: //二级欠频
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_UF_2L, (float)dataS16 / 100);
                #endif
                break;
            }

            case 10152: //二级过频故障清除时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_OF_2L_TIME, (float)dataS16 / 200);
                #endif
                break;
            }

            case 10153: //一级过频故障清除时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_OF_1L_TIME, (float)dataS16 / 200);
                #endif
                break;
            }

            case 10154: //一级欠频故障清除时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_UF_1L_TIME, (float)dataS16 / 200);
                #endif
                break;
            }

            case 10155: //二级欠频故障清除时间
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 1
                dataS16 = (int16_t)*pValue;
                FuncInf_Set1547Param(FUNCINF_OPERATOR_EMS, FUNCINF_1547_PARAM_TYPE_UF_2L_TIME, (float)dataS16 / 200);
                #endif
                break;
            }

            default:
            {
                printf("[%s][%d] addr = %d\n", __func__, __LINE__, addr);
                #if 0
                #endif
                break;
            }
        }
    }
    #endif
    return retVal;
}

